/**
 * 行联号查询
 */
package com.pay.sdk.service.liquidation.v2;

import java.util.Map;

import com.pay.sdk.common.Configure;
import com.pay.sdk.service.IPostService;
import com.pay.sdk.util.DateTimeUtil;
import com.pay.sdk.util.MD5Utils;

public class MsBankTypeV2Query extends IPostService {

	
	
    private static final String SERVICE_NAME = "v2_liquidation_query_banke_type";
    private static final String SERVICE_CHARSET = "UTF-8";
    private static final String SERVICE_SIGN_TYPE = "MD5";
    private static final String SERVICE_VERSION = "2.0";
    
    
    @Override
    public String exec(Map<String, String> params){
    	// 通用参数
    	params.put("version", SERVICE_VERSION);
	    params.put("charset", SERVICE_CHARSET);
	    params.put("sign_type",SERVICE_SIGN_TYPE);
	    params.put("req_time", DateTimeUtil.getDateTime());
	    params.put("service", SERVICE_NAME);
       //请求参数
        params.put("merchant_no", Configure.getMerchantNo());
        params.put("bank_code", params.get("bank_code"));
        params.put("province", params.get("province"));
        params.put("city", params.get("city"));
        params.put("branch_name", params.get("branch_name"));
        params.put("nonce_str", params.get("nonce_str"));
	    params = MD5Utils.signMap(params, SERVICE_SIGN_TYPE, Configure.getKey(), SERVICE_CHARSET);
        return txn(Configure.isDevEnv() ? Configure.LIQUIDATION_V2_GATEWAY_DEV_PAI : Configure.LIQUIDATION_V2_GATEWAY_PAI, params);
    }
}
